import request from '@/utils/request'

// 获取购物车列表
export const getShopCarList = id => {
  return request({
    method: 'GET',
    url: `/shoppingcart/page/${id}`

  })
}

// 添加购物车
export const addCart = data => {
  return request({
    method: 'POST',
    url: '/shoppingcart/add',
    data
  })
}

// 修改商品数量
export const updateCount = data => {
  return request({
    method: 'PUT',
    url: '/shoppingcart/update',
    data
  })
}

// 清空购物车 删除单个商品
export const delShopcart = data => {
  return request({
    method: 'DELETE',
    url: '/shoppingcart/delete',
    data
  })
}
